﻿<%@ Page Title="" Language="C#" ClientIDMode=Static MasterPageFile="~/User/User.Master" AutoEventWireup="true" CodeBehind="KCMX.aspx.cs" Inherits="CoolERP_Web.User.KCMX" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script src="../Scripts/lhgdialog/lhgcore.min.js" type="text/javascript"></script>
<script language=javascript>
    var DG = frameElement.lhgDG;
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td class=tbHead_L></td>
        <td class=tbHead_M><div><b>库存明细</b></div></td>
        <td class=tbHead_R></td>
    </tr>
    <tr>
        <td class=tbBody_L></td>
        <td class=tbBody_M>
            <ul class=tags style="width:95%;">
                <li class=liTitle><div>库存明细</div></li>
            </ul>
            <asp:GridView ID="GridView1" runat="server" DataKeyNames="ID" Width="95%" CssClass="grvCSS" AutoGenerateColumns="False" AllowPaging="True" OnRowDataBound="GridView1_RowDataBound"
                PageSize=100 OnRowDeleting="GridView1_RowDeleting" OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating" OnRowCancelingEdit="GridView1_RowCancelingEdit">
            <Columns>
                <asp:TemplateField HeaderText="仓库">
                    <ItemTemplate><%# Eval("CKMC")%></ItemTemplate>
                    <EditItemTemplate><asp:DropDownList runat=server ID="ddlCK"/></EditItemTemplate>
                    <FooterTemplate><asp:DropDownList runat=server ID="ddlCK"/></FooterTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="区">
                    <ItemTemplate><%# Eval("QU")%></ItemTemplate>
                    <EditItemTemplate><asp:TextBox ID="txtQU" runat="server" Text='<%# Eval("QU")%>' CssClass="textbox" MaxLength="2" Width=30px /></EditItemTemplate>
                    <FooterTemplate><asp:TextBox ID="txtQU" runat="server" MaxLength="2" Width=30px/></FooterTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="行">
                    <ItemTemplate><%# Eval("HANG")%></ItemTemplate>
                    <EditItemTemplate><asp:TextBox ID="txtHANG" runat="server" Text='<%# Eval("HANG")%>' CssClass="textbox" MaxLength="2" Width=30px onkeyup="txtLimit(this,0)" /></EditItemTemplate>
                    <FooterTemplate><asp:TextBox ID="txtHANG" runat="server" MaxLength="3" Width=30px onkeyup="txtLimit(this,0)"/></FooterTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="列">
                    <ItemTemplate><%# Eval("LIE")%></ItemTemplate>
                    <EditItemTemplate><asp:TextBox ID="txtLIE" runat="server" Text='<%# Eval("LIE")%>' CssClass="textbox" MaxLength="2" Width=30px onkeyup="txtLimit(this,0)" /></EditItemTemplate>
                    <FooterTemplate><asp:TextBox ID="txtLIE" runat="server" MaxLength="3" Width=30px onkeyup="txtLimit(this,0)"/></FooterTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="层">
                    <ItemTemplate><%# Eval("CENG")%></ItemTemplate>
                    <EditItemTemplate><asp:TextBox ID="txtCENG" runat="server" Text='<%# Eval("CENG")%>' CssClass="textbox" MaxLength="2" Width=30px onkeyup="txtLimit(this,0)" /></EditItemTemplate>
                    <FooterTemplate><asp:TextBox ID="txtCENG" runat="server" MaxLength="3" Width=30px onkeyup="txtLimit(this,0)"/></FooterTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="格">
                    <ItemTemplate><%# Eval("GE")%></ItemTemplate>
                    <EditItemTemplate><asp:TextBox ID="txtGE" runat="server" Text='<%# Eval("GE")%>' CssClass="textbox" MaxLength="2" Width=30px onkeyup="txtLimit(this,0)" /></EditItemTemplate>
                    <FooterTemplate><asp:TextBox ID="txtGE" runat="server" MaxLength="3" Width=30px onkeyup="txtLimit(this,0)"/></FooterTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="库存数量">
                    <ItemTemplate><%# Convert.ToDecimal(Eval("SL")).ToString("F")%></ItemTemplate>
                    <EditItemTemplate><%# Convert.ToDecimal(Eval("SL")).ToString("F")%></EditItemTemplate>
                    <FooterTemplate></FooterTemplate>
                </asp:TemplateField>
                <asp:TemplateField ShowHeader="False">
                    <ItemTemplate>
                    <asp:ImageButton ID="btnEdit" runat="server" Visible=false ImageUrl="~/Images/Common/btn_edit0.png" CommandName="Edit" />&nbsp;
                    <asp:ImageButton ID="btnDel" runat="server" ImageUrl="~/Images/Common/btn_del0.png" CommandName="Delete" OnClientClick="return confirm('确定要删除吗？');" /></ItemTemplate>
                    <EditItemTemplate>
                    <asp:ImageButton ID="btnSave" runat="server" ImageUrl="~/Images/Common/btn_save0.png" CommandName="Update" />&nbsp;
                    <asp:ImageButton ID="btnCancel" runat="server" ImageUrl="~/Images/Common/btn_cancel0.png" CommandName="Cancel" />
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:ImageButton ID="btnSave" runat="server" ImageUrl="~/Images/Common/btn_save0.png" OnClick="btnSave_Click" />&nbsp;
                        <asp:ImageButton ID="btnCancel" runat="server" ImageUrl="~/Images/Common/btn_cancel0.png" OnClick="btnCancel_Click" />
                    </FooterTemplate>
                </asp:TemplateField>
            </Columns>
            <PagerSettings Visible=false />
            </asp:GridView>
            <p align=center><asp:ImageButton ID="btnAdd" runat="server" ImageUrl="~/Images/Common/btn_add0.png" OnClick="btnAdd_Click" />
            &nbsp;&nbsp;&nbsp;&nbsp;<input type=image src="../Images/Common/btn_close.png" onclick="DG.cancel();" /></p>
        </td>
        <td class=tbBody_R></td>
    </tr>
    <tr>
        <td class=tbFoot_L></td>
        <td class=tbFoot_M></td>
        <td class=tbFoot_R></td>
    </tr>
</table>
</asp:Content>
